#!/usr/bin/python3

a = '1 2 3 4 5 6 7'
arr = a.split()

i = 0
j = len(arr)-1

while i < j:
    arr[i], arr[j] = arr[j], arr[i]
    i = i + 1
    j = j - 1

print(*arr)
